package me.zhenqu.model.pojo.entity;

import me.zhenqu.model.pojo.inf.JSONable;
import javax.persistence.*;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.NamedQuery;

@Entity
@NamedQuery(name="user.moreRecentThan", query="select n from User n where n.create_time >= :create_time")
@Table(name = "user", catalog = "zhenqu", uniqueConstraints = {
		@UniqueConstraint(columnNames = "nick_name") })
public class User implements JSONable {

    private long user_id;
    private int gender;
    private int city;
    private long create_time;
    private String nick_name;
    private String description;
    private int role_type;
    private long image_id;

    @Id
    @GeneratedValue(generator = "paymentableGenerator")
    @GenericGenerator(name = "paymentableGenerator", strategy = "increment")
    public long getUser_id() {
        return user_id;
    }

    public void setUser_id(long user_id) {
        this.user_id = user_id;
    }

    public int getGender() {
        return gender;
    }

    public void setGender(int gender) {
        this.gender = gender;
    }

    public int getCity() {
        return city;
    }

    public void setCity(int city) {
        this.city = city;
    }

    public long getCreate_time() {
        return create_time;
    }

    public void setCreate_time(long create_time) {
        this.create_time = create_time;
    }

    public String getNick_name() {
        return nick_name;
    }

    public void setNick_name(String nick_name) {
        this.nick_name = nick_name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getRole_type() {
        return role_type;
    }

    public void setRole_type(int role_type) {
        this.role_type = role_type;
    }

    public long getImage_id() {
        return image_id;
    }

    public void setImage_id(long image_id) {
        this.image_id = image_id;
    }

    public String toJson() {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public JSONable fromJson(String jsonstr) {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }
}
